import dialogForm from './edit'              //弹窗组件
import agentHttp from '@/utils/agentHttp'    //请求方法
import pagination from '@/views/pagination'  //分页组件
export default {
  name: 'hotBrands',
  components:{dialogForm,pagination},
  created(){
     this.seachData()
  },
  data() {
  	return {
  		//表格字段
      tableData: [{}],

      //弹窗状态数据
      dialogSendData:{
        isAdd:"",
        dialogFormVisible:"",
        id:""
      },
      searchForm:{}
  	}
  },
  methods: {
    seachData(){
      var params=this.searchForm||{};
      params.page=this.tableData.page||1;
      params.rows=this.tableData.rows||10;
      agentHttp.post('adminApi/admin/logistics_company/queryAllByEntity',params ).then((data)=>{
            this.tableData = data
      })
    },
    
    //新增、编辑
    handleEdit(index, row){
      row?this.dialogSendData.id=row.id:this.dialogSendData.id="";
      this.dialogSendData.isAdd=true;
      this.dialogSendData.dialogFormVisible=true;
    },
    //查看
    handleSee(index, row){
      row?this.dialogSendData.id=row.id:this.dialogSendData.id="";
      this.dialogSendData.isAdd=false;
      this.dialogSendData.dialogFormVisible=true;
    }
  }
}